package jmine.tec.di;

import bancosys.tec.exception.LocalizedMessageHolder;
import bancosys.tec.exception.MessageCreator;
import bancosys.tec.exception.MessageCreatorHelper;

/**
 * @author lundberg
 */
public enum DependencyInjectionMessages implements MessageCreator {
    MULTIPLE_ERRORS(1, "dependency-injection.multiple.errors"),

    PROPRIEDADE_VAZIA(1, "dependency-injection.propriedade.vazia"),

    FORMATO_INCORRETO(1, "dependency-injection.formato.incorreto"),

    TYPE_CONVERTION_ERROR(2, "dependency-injection.typeConvertionError"),

    PROPRIEDADE_NAO_ENCONTRADA(2, "dependency-injection.propriedade.nao.encontrada");

    private final MessageCreator delegate;

    /**
     * Construtor
     * 
     * @param nargs nargs
     * @param key key
     */
    private DependencyInjectionMessages(int nargs, String key) {
        this.delegate = MessageCreatorHelper.creator("jmine-tec-dependency-injection-messages", key, nargs);
    }

    /**
     * {@inheritDoc}
     */
    public LocalizedMessageHolder create(Object... arguments) {
        return this.delegate.create(arguments);
    }

    /**
     * {@inheritDoc}
     */
    public int getExpectedArguments() {
        return this.delegate.getExpectedArguments();
    }
}
